<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ page import="com.lp.cfg.ProConfig" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
    <title><%=ProConfig.PROJECT_NAME %>
    </title>
    <%@ include file="/WEB-INF/wechat/iot/common/resource_lib.jsp" %>
    <link rel="stylesheet" type="text/css" href="<%=basePath%>/lib/lpro/multiSelect/multi-select.css"/>
    <script type="text/javascript" src="<%=basePath%>/lib/lpro/multiSelect/multi-select.js"></script>
    <style>
        a, a.link {
            color: #666;
            text-decoration: none;
            font-weight: 500;
        }

        a, a.link:hover {
            color: #666;
        }

        h1, h2, h3, h4, h5, h6 {
            font-weight: normal;
        }

        .login {
            width: 100%;
            height: 100%;
            background: url(<%=basePath%>/image/wechat/iot/login-bg.png) no-repeat;
            background-size: cover;
            position: fixed;
            z-index: -10;
        }

        .welcome {
            width: 100%;
            margin: 25% 0;
        }

        .welcome img {
            width: 100%;
        }

        .login-inp {
            margin: 0 30px 15px 30px;
            border: 1px solid #fff;
            border-radius: 25px;
        }

        .login-inp label {
            width: 4em;
            text-align: center;
            display: inline-block;
            color: #fff;
        }

        .login-inp input {
            padding: 10px 0;
            color: #fff;
            background-color: transparent;
            border: none;
            outline: none;
        }

        .login-inp a {
            display: block;
            width: 100%;
            text-align: center;
            line-height: 40px;
            color: #fff;
            font-size: 16px;
            letter-spacing: 5px;
        }

        .login-txt {
            text-align: center;
            color: #fff;
            margin-top: 30px;
        }

        .login-txt a {
            color: #fff;
            padding: 0 5px;
        }

        .welcome {
            font-size: 28px;
            color: #fff;
            text-align: center;
        }
    </style>
</head>
<body>
<div class="login">
    <div class="welcome">
        <span>设备绑定</span>
    </div>
    <div class="login-form jui-form_submit" data-options=" url:'/wx/node/bind',
												  submit:'.bindbtn',
												  success:'sunccessReturn' ">
        <%--<div class="login-inp"><label>所属项目</label>
            <select type-name="scene_id"  config-option="  url:'/page/scene?paged=1&pageSize=100',key:'id',
                                                value:'name',init_value:'Please select a scene'"
                     class="input input-select input-big action_params control_device jui-selecter" ></select>
        </div>--%>
        <div class="login-inp"><label>设备序列号</label>
            <input validate="empty:请输入设备序列号" type-name="device_code" type="text" placeholder="">
        </div>
        <div class="login-inp"><label>上级经销商识别码</label>
            <input validate="empty:账号名称或邮箱" type-name="userName" type="text" placeholder="">
        </div>
        <div class="login-inp" id="login">
            <a href="javascript:;" class="bindbtn">立即绑定</a>
        </div>
        <%--<div class="login-txt">
            <a href="<%=basePath%>/">账户登录</a>  &nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="<%=basePath%>/service/wiot/register">注册账户</a></div>--%>
    </div>
</div>
</body>
<script type="text/javascript">
    $(function () {
        iosInitForm(".login-inp input");
    })

    function sunccessReturn(data) {
        if (isOK(data)) {
            $.toptip('绑定成功', 'success');
            setTimeout(function () {
            }, 1000);
            forward('/wiot/scene');
        } else {
            $.toptip(data.statusMsg, 'error');
        }
    }
</script>
</html>